<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:t="http://myfaces.apache.org/tomahawk">

<ui:composition>
	<h:head>
		<meta http-equiv="Content-Type"
			content="text/html; charset=ISO-8859-1" />
		<link type="text/css" rel="stylesheet" href="css/myform.css" />
		<title>Rede de Imóveis</title>
	</h:head>

	<f:view>
		<f:loadBundle basename="br.com.imob.properties.messages" var="labels" />

		<h:form id="FormPrincipal">
			<rich:panel id="panelDadosPessoais">
				<f:facet name="header">
					<h:outputText value="Dados Pessoais:" />
				</f:facet>
				<h:panelGrid id="gridDadosPessoais" columns="4">
					<h:outputText value="#{labels.nome}: "></h:outputText>
					<h:inputText id="nome" value="#{clienteBO.pessoa.nome}"></h:inputText>

					<h:outputText value="#{labels.sobrenome}: "></h:outputText>
					<h:inputText id="sobrenome" value="#{clienteBO.pessoa.sobrenome}"></h:inputText>

					<h:outputText value="#{labels.rg}: "></h:outputText>
					<h:inputText id="rg" value="#{clienteBO.pessoa.rg}"></h:inputText>

					<h:outputText value="#{labels.cpf}: "></h:outputText>
					<h:inputText id="cpf" value="#{clienteBO.pessoa.cpf}"></h:inputText>

					<h:outputText value="#{labels.nascimento}: "></h:outputText>
					<h:inputText id="nascimento" value="#{clienteBO.pessoa.nascimento}"></h:inputText>

					<h:outputText value="#{labels.sexo}: "></h:outputText>
					<h:inputText id="sexo" value="#{clienteBO.pessoa.sexo}"></h:inputText>

					<h:outputText value="#{labels.tipoPessoa}: "></h:outputText>
					<h:inputText id="tipoPessoa" value="#{clienteBO.pessoa.tipoPessoa}"></h:inputText>

					<h:outputText value="#{labels.origem}: "></h:outputText>
					<h:inputText id="origem" value="#{clienteBO.pessoa.origem.origem}"></h:inputText>

					<h:outputText value="#{labels.email}: "></h:outputText>
					<h:inputText id="email" value="#{clienteBO.pessoa.login.email}"></h:inputText>

					<h:outputText value="#{labels.senha}: "></h:outputText>
					<h:inputSecret id="senha" value="#{clienteBO.pessoa.login.senha}"></h:inputSecret>

				</h:panelGrid>
			</rich:panel>
			<rich:panel id="panelDadosContrato">
				<f:facet name="header">
					<h:outputText value="Dados do Contrato:" />
				</f:facet>
				<h:panelGrid id="gridDadosContrato" columns="4">
					<h:outputText value="#{labels.prazo}: "></h:outputText>
					<rich:calendar id="prazo" datePattern="dd/MM/yyyy"
						value="#{clienteBO.cliente.prazo}" enableManualInput="true"></rich:calendar>

					<h:outputText value="#{labels.origem}: "></h:outputText>
					<h:inputText id="clienteOrigem" value="#{clienteBO.cliente.origem}"></h:inputText>

					<h:outputText value="#{labels.pretensao}: "></h:outputText>
					<h:inputText id="pretensao" value="#{clienteBO.cliente.pretensao}"></h:inputText>

					<h:outputText value="#{labels.finalidade}: "></h:outputText>
					<h:inputText id="finalidade"
						value="#{clienteBO.finalidade.finalidade}"></h:inputText>

					<br />
					<br />

					<h:outputText value="#{labels.categoria}: "></h:outputText>
					<!--  				<rich:comboBox defaultLabel="Selecione um Item" value="#{clienteMB.dadosForm.finalidade.categoria}" converter="SimpleIndexConverter">
 						<t:selectItems value="#{clienteMB.categorias}" var="item" itemLabel="#{item.categoria}" itemValue="#{item}" />
 					</rich:comboBox>
 -->
					<h:selectOneMenu id="categoria"
						value="#{clienteBO.finalidade.categoria}">
						<f:selectItem itemLabel="Selecione um Item" itemValue="" />
						<t:selectItems value="#{clienteBO.categorias}" var="item"
							itemLabel="#{item.categoria}" itemValue="#{item}" />
					</h:selectOneMenu>
				</h:panelGrid>
			</rich:panel>
			<h:commandButton action="#{clienteBO.incluir}"
				value="#{labels.incluir}"></h:commandButton>
		</h:form>
	</f:view>
</ui:composition>
</html>